<template>
    <view class="rootbox" v-if="dataobj && dataobj.showObj">
        <view :class="'ul list_ul' +( dataobj.showObj.service == 'business' ? ' shop_ul' : '') + (dataobj && dataobj.showObj && dataobj.showObj.id ? (' ' +dataobj.showObj.service + '_ul') : '')" v-if="dataobj && dataobj.dataObj.styletype == 3">
            <block v-for="(item,dind) in dataobj.listArr" :key="dataobj.showObj.service + item.id">
                
                <view  :class="{'cardShow':dataobj.dataObj.cardStyle,'li':true,'moreList':dataobj.more && dataobj.more.show}" :style="checkStyle(dataobj.dataObj,'list')"  @click="toLink(item)" >
                    
                    <!--  商家列表  -->
                    <view :class="{'list_con':true,'flex_li': !item.banner || item.banner.length == 1 || item.logo}" v-if="dataobj.showObj.service == 'business'">
                        <view class="flex_l">
                            <view  class="h2" :style="'color:'+dataobj.dataObj.modCon.style.color+';'">{{item.title}}</view>
                            <view class="binfo">
                                <view class="bScore" :style="Number(item.rating) == 0 ? 'font-weight:normal;' : ''"><view class="s"><image :src="masterDomain + '/static/images/admin/siteConfigPage/star1.png'" mode="aspectFit" >
                                    
                                </image></view>{{Number(item.rating) > 0 ? (item.rating) : '暂无评分'}}</view>
                                <view class="bType">{{item.typename[item.typename.length - 1]}}</view>
                                <view class="bTime"  v-if="item.opentime.trim() && item.opentime.trim().length > 4 && (item.banner && item.banner.length > 1)">营业时间：{{item.opentime.trim()}}</view>
                                <!-- <view class="bHui"><em>惠</em><span>买单6折</span></view> -->
                                <view :class="{'bFactry':true,'block':item.opentime.trim() ||  (!Array.isArray(item.typename) || item.typename.length == 0)}" v-if="item.tagArr && item.tagArr.length">
                                    <text class="span" v-for="lab in item.tagArr" :key="lab">{{lab}}</text>
                                </view>
                                <view class="bTime timeBottom" v-if="item.opentime.trim()  && item.opentime.trim().length > 4 && (!item.banner || item.banner.length <= 1)">营业时间：{{item.opentime.trim()}}</view>
                            </view>
                            <view class="bPhotosBox" v-if="item.banner && item.banner.length > 1">
                                <view class="bPhotos">
                                    <view :class="['pic', {'absoulte_pic':dataobj.dataObj.modCon.imgScale != 1}]" :style="checkStyle(dataobj.dataObj,'pic')" :key="pind" v-for="(pic,pind) in item.banner.slice(0,item.banner.length > 3 ? 3 : item.banner.length)">
                                        <image  :class="{'loadingImg': !imgHasLoad[pic.pic]}" @load="imgLoadEnd(pic.pic)" mode="aspectFill" :src="pic.pic.trim() ? pic.pic : errorImg" @error="(e) => imgLoadErr(pic,'pic')" :data-id="item.id"></image>
                                    </view>
                                </view>
                                <view class="pic_mask" v-if="item.banner.length > 3">+{{item.banner.length - 3}}</view>
                            </view>
                            <view class="bPosi">
                                <view class="b_addr"><view class="s"><image :src="masterDomain + '/static/images/admin/siteConfigPage/posi_icon.png'" mode="aspectFit" >
                                </image></view><view class="span">{{item.address ? item.address : '暂无信息'}}</view></view>
                                <view class="b_distance"><view class="s"></view><text class="span">{{item.distance}}</text></view>
                            </view>
                        </view>
                        <view class="flex_r" v-if="(!item.banner || item.banner.length <=1) && item.logo">
                            <view :class="['singlePic' , {'absoulte_pic':dataobj.dataObj.modCon.imgScale != 1}]" :style="checkStyle(dataobj.dataObj,'pic')"><image mode="aspectFill" :src="item.logo ? item.logo : errorImg"  @error="imgLoadErr(item,'logo')" ></image></view>
                        </view>
                    </view>
    
    
    
                    <!-- 分类信息 -->
                    <view class="list_con" v-else-if="dataobj.showObj.service == 'info'">
                        <view class="fb_info" v-if="item.member">
                            <view class="fb_photo">
                                <image :class="{'loadingImg': !imgHasLoad[item.member.photo]}" @load="imgLoadEnd(item.member.photo)"  @error="imgLoadErr(item.member,'photo')" :src="item.member.photo ? item.member.photo : errPhoto" mode="aspectFill"  alt=""></image>
                                <view  class="top span" v-if="item.isbid == '1'">置顶</view>

                                </view>
                            <view class="fb_detail">
                                <view class="h4">{{item.member.nickname}}</view>
                                <view class="p">{{item.pubdate1}}</view>
                            </view>
                        </view>
                        <view class="fb_con">
                            <view class="h2" :style="'color:'+ dataobj.dataObj.modCon.style.color +'; font-size:' +dataobj.dataObj.modCon.style.fontSize + 'rpx;'">
                                
                                {{item.titleNew}}
                            </view>
                            <view class="labs" >
                                <view class="typename">{{ item.typename }}</view>
                                <view class="tg span" v-if="item.hasSetjili == '1' && uniPlatform != 'mp-weixin' && uniPlatform != 'mp-toutiao' && (item.rewardCount > 0 || item.readInfo == '1') && !item.litpic && (!item.picArr.length)">推广红包</view>
                                <view v-for="(lab,labInd) in item.label" :key="labInd" class="lab span">{{lab.name}}</view>
                            </view>
                            <view class="picsbox" v-if="(item.picArr && item.picArr.length) || item.litpic">
                                <view  class="hb" v-if="item.hasSetjili == '1' && uniPlatform != 'mp-weixin' && uniPlatform != 'mp-toutiao' && item.countHongbao">
                                    <view class="s"><image  class="" :src="masterDomain + '/static/images/admin/siteConfigPage/hb.png'" mode="aspectFit" ></image></view><text class="span">红包派送中</text>
                                </view>
                                <view :class="{'pics':true, 'morePics':item.picArr && item.picArr.length > 1}" >
                                    <view class="pic"  v-for="pic in item.picArr.slice(0,3)" :key="pic">
                                        <view  :style="checkStyle(dataobj.dataObj,'pic')" :class="['picInner', {'absoulte_pic':dataobj.dataObj.modCon.imgScale != 1}]">
                                            <image :class="{'loadingImg': !imgHasLoad[pic.litpic]}" @load="imgLoadEnd(pic.litpic)" @error="imgLoadErr(pic,'litpic')" :mode="dataobj.dataObj.modCon.imgScale === 1 ? 'widthFix' : 'aspectFill'" :style="dataobj.dataObj.modCon.imgScale === 1 ? '' : 'height:100%;'" :src="pic.litpic ? pic.litpic : errorImg" ></image>
                                        </view>
                                    </view>
                                    <view class="mask_pic" v-if="item.picArr && item.picArr.length > 3"> + {{(item.picArr.length - 3)}}</view>
                                </view>
                            </view>
                            <view class="fb_opt">
                                <view class="flex_l">
                                    <view class="addr span" v-if="item.dizhi"><view class="s"><image  class="" :src="masterDomain + '/static/images/admin/siteConfigPage/posi_icon.png'" mode="aspectFit" ></image></view><text class="span">{{item.dizhi}}</text></view>
                                    <view class="em" v-if="item.dizhi && item.distance"></view>
                                    <text class="distance span" v-if="item.dizhi && item.distance">{{ item.distance }}</text>                           
                                </view>
                                <view class="flex_r" @click.stop="">
                                    <button open-type="share" data-url="/pages/packages/info/detail/detail" data-name="shareBtn" :data-info="item" class="share" @click="shareInfoTo(item)"><view class="s"><image  class="" :src="masterDomain + '/static/images/admin/siteConfigPage/share_info.png'" mode="aspectFit" ></image></view>分享</button>
                                    <view class="phone"  v-if="userid && !userPhoneCheck && privateNumber_state" @click.stop.prevent="bindUserPhoneNumber" :data-index="dind" :data-info="item" data-module="info" data-temp="detail" :data-aid="item.id" :data-tel="item.tel"><view class="s"><image  class="" :src="masterDomain + '/static/images/admin/siteConfigPage/phone_info.png'" mode="aspectFit" ></image></view>电话</view>
    
                                    <view class="phone" v-else @click.stop.prevent="callPhone" :data-index="dind" :data-info="item" data-module="info" data-temp="detail" :data-aid="item.id" :data-tel="item.tel"><view class="s"><image  class="" :src="masterDomain + '/static/images/admin/siteConfigPage/phone_info.png'" mode="aspectFit" ></image></view>电话</view>
                                </view>
                            </view>
                        </view>
                    </view>
    
                    <!-- 圈子 -->
                    <view class="list_con" v-else-if="dataobj.showObj.service == 'circle'">
                        <view :class="['picbox', {'absoulte_pic':dataobj.dataObj.modCon.imgScale != 1}]" :style="checkStyle(dataobj.dataObj,'pic')"><image :class="{'loadingImg': !imgHasLoad[item.litpic]}" @load="imgLoadEnd(item.litpic)"  @error="imgLoadErr(item,'litpic')" :mode="dataobj.dataObj.modCon.imgScale === 1 ? 'widthFix' : 'aspectFill'"  :style="dataobj.dataObj.modCon.imgScale === 1 ? '' : 'height:100%;'" :src="item.litpic ? item.litpic : errorImg" ></image></view>
                        <view class="txtbox" >
                            <view class="h4" :style="'color:'+dataobj.dataObj.modCon.style.color+';'">{{item.title}}</view>
                            <view class="fb_info">
                                <view class="fb_photo"></view>
                                <view class="fb_name"></view>
                            </view>
                        </view>
                    </view>
    
                    <!-- 贴吧 -->
                    <view class="list_con" v-else-if="dataobj.showObj.service == 'tieba'">
                        <view class="fb_info" >
                            <view class="fb_photo"><image :class="{'loadingImg': !imgHasLoad[item.photo]}" @load="imgLoadEnd(item.photo)" :src="item.photo ? item.photo : errPhoto" @error="imgLoadErr(item,'photo')"  mode="aspectFill" ></image></view>
                            <view class="fb_detail">
                                <view  class="h4" :style="'color:'+dataobj.dataObj.modCon.style.authColor+';'">{{item.username}}</view>
                                <view class="fb_txt">
                                    <view class="p">{{item.typename ? '#' + item.typename[item.typename.length - 1] : ''}}</view>
                                    <view class="fb_date">{{item.pubdate1}}</view>
                                </view>
                            </view>
                        </view>
                        <view class="fb_con">
                            <view class="h2" :style="'color:'+dataobj.dataObj.modCon.style.color+'; font-size:'+(dataobj.dataObj.modCon.style.fontSize )+'rpx;'"><view class="hot span" v-if="item.top == '1'">{{item.top == '1' ? '置顶':''}}</view><view class="jing span" v-if="item.jinghua == '1'">精</view>{{item.title}}</view>
                            <view class="picsbox">
                                <view :class="{'pics':true, 'morePics':item.imgGroup && item.imgGroup.length > 1}" >
                                    <view class="pic"  v-for="(pic,pind) in item.imgGroup.slice(0,(item.imgGroup.length > 3 ? 3 : item.imgGroup.length))" :key="pic" >
                                        <view  :style="checkStyle(dataobj.dataObj,'pic')" :class="['picInner', {'absoulte_pic':dataobj.dataObj.modCon.imgScale != 1}]">
                                            <image :class="{'loadingImg': !imgHasLoad[pic]}" @load="imgLoadEnd(pic)"  @error="imgLoadErr(item.imgGroup,pind)" :mode="dataobj.dataObj.modCon.imgScale === 1 ? 'widthFix' : 'aspectFill'" :style="dataobj.dataObj.modCon.imgScale === 1 ? '' : 'height:100%;'" :src="pic ? pic : errorImg"  ></image>
                                        </view>
                                    </view>
                                    <view class="mask_pic" v-if="item.imgGroup && item.imgGroup.length > 3"> + {{(item.imgGroup.length - 3)}}</view>
                                </view>
                            </view>
                        </view>
                        <view class="fb_opt">
                            <view class="flex_l">
                                <view class="read span"><view class="s"><image  mode="aspectFit" :src="masterDomain + '/static/images/admin/siteConfigPage/read_tieba.png'"></image></view>{{item.click ? item.click : '浏览'}}</view>
                            </view>
                            <view class="flex_r">
                                <view class="reply span" @click.stop.prevent="toReply(item)"><view class="s"><image  mode="aspectFit" :src="masterDomain + '/static/images/admin/siteConfigPage/reply_tieba.png'"></image></view>{{item.reply > 0 ? item.reply : '评论'}}</view>
                                <view class="zan span" @click.stop.prevent="toZan(item)"><view class="s"><image  mode="aspectFit" :src="masterDomain + '/static/images/admin/siteConfigPage/zan_tieba.png'"></image></view>{{item.up ? item.up : '点赞'}}</view>
                            </view>
                        </view>
                    </view>
    
    
                    <!-- 房产 -->
                    <view class="list_con" v-else-if="dataobj.showObj.service == 'house'">
                        <view class="leftPic test" >
                            <view  :style="checkStyle(dataobj.dataObj,'pic')" :class="['picInner', {'absoulte_pic':dataobj.dataObj.modCon.imgScale != 1}]">
                                <image :class="{'loadingImg': !imgHasLoad[item.litpic]}" @load="imgLoadEnd(item.litpic)" @error="imgLoadErr(item,'litpic')" :mode="dataobj.dataObj.modCon.imgScale === 1 ? 'widthFix' : 'aspectFill'" :style="dataobj.dataObj.modCon.imgScale === 1 ? '' : 'height:100%;'"  :src="item.litpic ? item.litpic : errorImg"  ></image>
                            </view>
                        </view>
                        <view class="rightText">
                            <!-- 新房 -->
                            <block v-if="dataobj.showObj.action == 'loupanList'">
                                <view class="wrap h2"  :style="'color:'+dataobj.dataObj.modCon.style.color+'; font-size:'+ (dataobj.dataObj.modCon.style.fontSize) +'rpx;'">{{item.title}}</view>
                                <view class="p">{{item.addr && Array.isArray(item.addr) ? item.addr.slice(-2).join("·"):item.addr}}/{{item.hx_area.join('-')}}㎡/{{item.hx_room.join('.')}}居室</view>
                                <view class="price" v-if="item.price != '0'" :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'">
                                    <text class="b">{{parseFloat(item.price)}}</text>{{item.ptype != 1 ? '万/套' : ( (currency && currency.short ? currency.short : '元')+ '/平') }}
                                </view>
                                <view class="price" v-else :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'"><text class="b">待定</text></view>
                                <view class="labs"><view class="lab span" v-for="lab in item.buildtype" :key="lab">{{lab}}</view></view>
                            
                            </block>
                            
                            <!-- 二手房 -->
                            <block v-if="dataobj.showObj.action == 'saleList'">
                                <view class="wrap h2" :style="'color:'+dataobj.dataObj.modCon.style.color+'; font-size:'+ (dataobj.dataObj.modCon.style.fontSize ) +'rpx;'">{{item.title}}</view>
                                <view class="p">{{item.addr && Array.isArray(item.addr) ? item.addr.slice(-2).join("·"):item.addr}}/{{item.area}}㎡/{{item.room}}</view>
                                <view class="price" :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'" v-if="item.price != '0'">
                                    <text class="b">{{parseFloat(item.price)}}</text>万 <text class="unitprice span">{{item.unitprice}}{{currency && currency.short ? currency.short : '元'}}/平</text>
                                </view>
                                <view class="price" :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'" v-else><text class="b">面议</text></view>
                                <view class="labs" v-if="item.protype"><text class="lab span" >{{item.protype}}</text></view>
                            </block>
    
                            <!-- 出租 -->
                            <block v-if="dataobj.showObj.action == 'zuList'">
                                <view class="wrap h2" :style="'color:'+dataobj.dataObj.modCon.style.color+'; font-size:'+ (dataobj.dataObj.modCon.style.fontSize) +'rpx;'">[{{item.rentype}}]{{item.title}}</view>
                                <view class="p">{{item.addr && Array.isArray(item.addr) ? item.addr.slice(-2).join("·"):item.addr}}/{{item.area}}㎡/{{item.room}}</view>
                                <view class="price" v-if="item.price != '0'" :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'">
                                    <text class="b">{{parseFloat(item.price)}}</text>{{currency && currency.short ? currency.short : '元'}}/月
                                </view>
                                <view class="price" :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'" v-else><text class="b">面议</text></view>
                            </block>
    
    
                            <!-- 商铺 办公-->
                            <block v-if="dataobj.showObj.action == 'spList' || dataobj.showObj.action == 'xzlList'">
                                <view class="h2 wrap" :style="'color:'+dataobj.dataObj.modCon.style.color+'; font-size:'+ (dataobj.dataObj.modCon.style.fontSize ) +'rpx;'" >[{{item.type == 1 ? '出售' : (item.type == 2) ? '转让' : '出租'}}]{{item.title}}</view>
                                <view  class="p">{{item.addr && Array.isArray(item.addr) ? item.addr.slice(-2).join("·"):item.addr}}/{{item.area}}㎡/{{item.room}}</view>
                                <view class="price" v-if="item.price != '0'" :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'">
                                    <view class="span" v-if="item.type !== 1"><text class="b">{{parseFloat(item.price)}}</text>{{currency && currency.short ? currency.short : '元'}}/月</view>
                                    <view class="span" v-else><text class="b">{{parseFloat(item.price)}}</text>万</view>
                                </view>
                                <view class="price" :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'" v-else><text class="b">面议</text></view>
                            </block>
    
                            <!-- 车位-->
                            <block v-if="dataobj.showObj.action == 'cwList'">
                                <view  class="wrap h2" :style="'color:'+dataobj.dataObj.modCon.style.color+'; font-size:'+ (dataobj.dataObj.modCon.style.fontSize ) +'rpx;'">[{{item.type == 1 ? '出售' : (item.type == 2) ? '转让' : '出租'}}]{{item.title}}</view>
                                <view class="p">{{item.addr && Array.isArray(item.addr) ? item.addr.slice(-2).join("·"):item.addr}}/{{item.area}}㎡/{{item.protype}}</view>
                                <view class="price" v-if="item.price != '0'" :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'">
                                    <view class="span " v-if="item.type !== 1"><text class="b">{{parseFloat(item.price)}}</text>{{currency && currency.short ? currency.short : '元'}}/月</view>
                                    <view class="span" v-else><text class="b">{{parseFloat(item.price)}}</text>万</view>
                                </view>
                                <view class="price" :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'" v-else><text class="b">面议</text></view>
                            </block>
    
                            <!-- 厂房 -->
                            <block v-if="dataobj.showObj.action == 'cfList'">
                                <view class="wrap h2" :style="'color:'+dataobj.dataObj.modCon.style.color+'; font-size:'+ (dataobj.dataObj.modCon.style.fontSize ) +'rpx;'">[{{item.type == 1 ? '出售' : (item.type == 2) ? '转让' : '出租'}}]{{item.title}}</view>
                                <view class="p">{{item.area}}㎡/{{item.addr ? item.addr.slice(-2).join("·"):item.addr}}</view>
                                <view class="price" v-if="item.price != '0'" :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'">
                                    <view class="span" v-if="item.type !== 1"><text class="b">{{parseFloat(item.price)}}</text>{{currency && currency.short ? currency.short : '元'}}/月</view>
                                    <view class="span" v-else><text class="b">{{parseFloat(item.price)}}</text>万</view>
                                </view>
                                <view class="price" :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'" v-else><text class="span">面议</text></view>
                            </block>
    
    
    
                            <!-- 小区 -->
                            <block v-if="dataobj.showObj.action == 'communityList'">
                                <view class="wrap h2" :style="'color:'+dataobj.dataObj.modCon.style.color+'; font-size:'+ (dataobj.dataObj.modCon.style.fontSize) +'rpx;'">{{item.title}}</view>
                                <view class="p">{{item.protype ? item.protype  : '住宅'}}/{{transTimes(item.opendate,2).split('-')[0]}}年建成</view>
                                <view class="price" :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'" v-if="item.price != '0'">
                                均价<text class="b">{{parseFloat(item.price)}}</text>{{currency && currency.short ? currency.short : '元'}}/平 <text class="sz_info span" v-if="item.saleCount > 0">在售{{item.saleCount}}</text><text class="sz_info span" v-if="item.zuCount > 0">在租{{item.zuCount}}</text>
                                </view>
                                <view class="price" :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'" v-else><text class="b">待定</text><text class="sz_info span" v-if="item.saleCount > 0">在售{{item.saleCount}}</text><text class="span sz_info" v-if="item.zuCount > 0">在租{{item.zuCount}}</text></view>
                                <view class="addr"><view class="s"><image   mode="aspectFit" :src="masterDomain + '/static/images/admin/siteConfigPage/posi_icon.png'"></image></view><text class="span">{{item.addr.join(' ')}}</text></view>
                            </block>
                            <view class="line_house" v-if="!dataobj.dataObj.cardStyle" :style="'background:'+ dataobj.dataObj.style.lineColor +'; bottom:'+ (-dataobj.dataObj.style.splitMargin/2/2) + 'px;'"></view>
                        </view>
                    </view>
    
                    <!-- 资讯 -->
                    <view class="list_con" v-else-if="dataobj.showObj.service == 'article'">
                        <block v-if="item.mold == 0 || (item.mold == 1 && item.group_img.length < 3) || (item.mold == 2 || item.mold == 3) ">
                            <!-- 单图左右 -->
                            <view class="flex_list" v-if="item.typeset == 0 && (item.mold != 2 && item.mold != 3)"  >
                                <view class="art_text">
                                    <!-- <rich-text :nodes="htmlToUni(item)" class="h2"  :style="'color:'+dataobj.dataObj.modCon.style.color+';'"> </rich-text> -->
                                    <mp-html class="h2" :content="htmlToUni(item,dataobj.dataObj.modCon.style.color)"></mp-html>
                                    <view class="art_info">
                                        <view class="mold span" v-if="item.mold == '0'"><!--置顶，资讯没有置顶标签--></view><view class="span"><text class="em" :style="'color:'+dataobj.dataObj.modCon.style.sourceColor+';'">{{item.writer ? item.writer : item.source}} </text> · {{transTimes(item.pubdate,3)}}</view> 
                                        <view class="read span"><view class="s"><image  :src="masterDomain + '/static/images/admin/siteConfigPage/read.png'"></image></view><view class="em">{{item.click}}</view></view></view>
                                </view>
                                <view class="imgbox" v-if="item.litpic" >
                                    <view  :style="checkStyle(dataobj.dataObj,'pic')" :class="['picInner', {'absoulte_pic':dataobj.dataObj.modCon.imgScale != 1}]">
                                        <image :class="{'loadingImg': !imgHasLoad[item.litpic]}" @load="imgLoadEnd(item.litpic)" @error="imgLoadErr(item,'litpic')" :data-litpic="item.litpic" :mode="dataobj.dataObj.modCon.imgScale === 1 ? 'widthFix' : 'aspectFill'" :style="dataobj.dataObj.modCon.imgScale === 1 ? '' : 'height:100%;'" :src="item.litpic ?item.litpic : errorImg"></image>
                                    </view>
                                </view>
                            </view>
    
                            <!-- 大图左右 -->
                            <view class=" bigImg_list" v-else>
                                <!-- <rich-text :nodes="htmlToUni(item)" class="h2"  :style="'color:'+dataobj.dataObj.modCon.style.color+';'"> </rich-text> -->
                                <mp-html class="h2" :content="htmlToUni(item,dataobj.dataObj.modCon.style.color)"></mp-html>
                                <view class="imgbox" v-if="item.litpic">
                                    <view v-if="item.mold == 2 || item.mold == 3" class="video_icon"><image
                                        :src="imgurl + 'pause3.png'"
                                        mode="aspectFill"
                                    /></view>
                                    <view  :style="checkStyle(dataobj.dataObj,'pic')" :class="['picInner', {'absoulte_pic':dataobj.dataObj.modCon.imgScale != 1}]">
                                        <image  :class="{'loadingImg': !imgHasLoad[item.litpic]}" @load="imgLoadEnd(item.litpic)" :data-litpic="item.litpic" :mode="dataobj.dataObj.modCon.imgScale === 1 ? 'widthFix' : 'aspectFill'" :style="dataobj.dataObj.modCon.imgScale === 1 ? '' : 'height:100%;'" :src="item.litpic ? item.litpic : errorImg"  @error="imgLoadErr(item,'litpic')"></image>
                                    </view>
                                </view>
                                <view class="art_info">
                                    <view class="mold span" v-if="item.mold == '0'"><!--置顶，资讯没有置顶标签--></view>
                                    <view class="span"><text class="em" :style="'color:'+dataobj.dataObj.modCon.style.sourceColor+';'">{{item.writer ? item.writer : item.source}} </text> · {{transTimes(item.pubdate,3)}}</view> 
                                    <view class="read span"><image :src="masterDomain + '/static/images/admin/siteConfigPage/read.png'" class="s"></image><text class="em">{{item.click}}</text></view>
                                </view>
                            </view>
                        </block>
    
                        <!-- 多图 --> 
                        <block v-else>
                            <view class="moreImg_list">
                                <!-- <rich-text :nodes="htmlToUni(item)" class="h2"  :style="'color:'+dataobj.dataObj.modCon.style.color+';'"> </rich-text> -->
                                <mp-html class="h2" :content="htmlToUni(item,dataobj.dataObj.modCon.style.color)"></mp-html>
                                <view class="imgCon" v-if="item.group_img  && Array.isArray(item.group_img) && item.group_img.length " >
                                    <view :class="['imgbox', {'absoulte_pic':dataobj.dataObj.modCon.imgScale != 1}]"  :style="checkStyle(dataobj.dataObj,'pic')" v-for="img in (item.group_img.slice(0,(item.group_img.length > 3 ? 3 : item.group_img.length)))"  :key="img.path"><image :class="{'loadingImg': !imgHasLoad[img.path]}" @load="imgLoadEnd(img.path)"  :src="img.path ? img.path : errorImg" mode="aspectFill"  @error="imgLoadErr(img,'litpic')" alt=""></image></view>
                                </view>
                                <view class="art_info">
                                    <view class="mold span" v-if="item.mold == '0'"><!--置顶，资讯没有置顶标签--></view>
                                    <view class="span"><text class="em" :style="'color:'+dataobj.dataObj.modCon.style.sourceColor+';'">{{item.writer ? item.writer : item.source}} </text> · {{transTimes(item.pubdate,3)}}</view> 
                                    <view class="read span"><image :src="masterDomain + '/static/images/admin/siteConfigPage/read.png'" class="s"></image><text class="em">{{item.click}}</text></view>
                                </view>
                            </view>
                        </block>
                    </view>
    
    
                    <!-- 顺风车 -->
                    <view class="list_con" v-else-if="dataobj.showObj.service == 'sfcar'">
                        <view class="carInfo"><view  :class="'cartype span ' + ( item.usetype == '1' ? 'truck' : 'car')" :style="'color:'+ dataobj.dataObj.modCon.style[(item.usetype == '1' ? 'color_type2' :'color_type1' )]+'; background-color:'+dataobj.dataObj.modCon.style[(item.usetype == '1' ? 'bgColor_type2' :'bgColor_type1')]+';'">{{item.usetypename}}</view><view class="h2" :style="'color:'+dataobj.dataObj.modCon.style.color+';font-size:'+(dataobj.dataObj.modCon.style.fontSize )+'rpx;'">{{item.startaddr}}<view class="s"><image  mode="aspectFit" :src="masterDomain + '/static/images/admin/siteConfigPage/placeFan.png'" ></image></view>{{item.endaddr}}</view> </view>
                        <view class="startDate">
                            <view class="flex_l"><text :class="(item.missiontype == 1 ? 'startdayDay' : 'startday') + ' b'" :style="'color:'+dataobj.dataObj.modCon.style.startDate+';'">{{item.missiontime }}</text> <text class="startWeek span" :style="'color:'+dataobj.dataObj.modCon.style.startTime+';'">{{item.missiontime1}}</text></view>
                            <view class="flex_r">{{item.pubdatetime}}</view>
                        </view>
                        
                        <view class="noteText"  v-if="item.note"><text class="b">备注：</text>{{item.note}}</view>
                        <view class="infobox">
                            <view class="flex_l"><text class="lab span" v-for="tag in item.tag" :key="tag">{{tag}}</text></view>
                            <view class="flex_r" v-if="userid && !userPhoneCheck && privateNumber_state" @click.stop.prevent="bindUserPhoneNumber" :data-index="dind" :data-info="item"
                                                                data-module="sfcar" data-temp="detail" :data-aid="item.id"
                                                                :data-tel="item.tel"><text class="span">拨打电话</text></view>
                            <view class="flex_r" v-else  @click.stop.prevent="callPhone" :data-index="dind" :data-info="item"
                                                                data-module="sfcar" data-temp="detail" :data-aid="item.id"
                                                                :data-tel="item.tel"><text class="span">拨打电话</text></view>
                        </view>
                    </view>
    
                    
    
                    <!-- 大商家 -->
                    <view :class="['list_con store_con']" v-else-if="dataobj.showObj.service == 'business'">
                        <view :class="['picbox', {'absoulte_pic':dataobj.dataObj.modCon.imgScale != 1}]" :style="checkStyle(dataobj.dataObj,'pic')" >
                            <view class="tag span">{{item.typename[item.typename.length - 1]}}</view>
                            <image  @error="imgLoadErr(item,'logo')" :class="{'loadingImg': !imgHasLoad[item.logo]}" @load="imgLoadEnd(item.logo)" :mode="dataobj.dataObj.modCon.imgScale === 1 ? 'widthFix' : 'aspectFill'"  :style="dataobj.dataObj.modCon.imgScale === 1 ? '' : 'height:100%;'" :src="item.logo ? item.logo : errorImg"  alt=""></image>
                            <view class="distance span">{{item.distance}}</view>
                        </view>
                        <view class="txtbox" >
                            <view class="h4">{{item.title}}</view>
                            <view class="p">{{item.address}}</view>
                            <view  class="labs p" v-if="item.tagArr && item.tagArr.length > 0"><view class="lab span" v-for="lab in item.tagArr" :key="lab">{{lab}}</view></view>
                        
                        </view>
                    </view>
    
    
    
    
                    <!-- 招聘 -->
                    <block  v-else-if="dataobj.showObj.service == 'job'">
                        <!-- 找工作 -->
                        <view :class="{'list_con':true,'hasDelivery':item.has_delivery }" v-if="dataobj.showObj.id == 18">
                            <view class="itemBox">
                                <view class="itemCon">
                                    <view class="item_head">
                                        <view class="h2" :style="'color:'+dataobj.dataObj.modCon.style.color+';'"><view class="top_label span" v-if="item.is_topping">置顶</view><text class="item_tit span">{{item.title}}</text><view class="d_mark span" v-if="item.has_delivery">已投递</view></view>
                                        <view class="salary_show span" :style="'color:'+dataobj.dataObj.modCon.style.scolor+';'">{{item.show_salary}}<text class="span" v-if="(item.dy_salary > 12 && !item.mianyi)"> · {{item.dy_salary}}<text class="b">薪</text></text></view>
                                    </view>
                                    <view class="item_label"><text class="span" >{{item.experience ? item.experience : '经验不限'}}</text><text class="span">{{item.educational}}</text></view>
                                    <view class="company_info" v-if="item.companyDetail">
                                        <view class="company">
                                            <view class="clogo">
                                                <image  @error="imgLoadErr(item.companyDetail,'logo')"  :src="item.companyDetail.logo ? item.companyDetail.logo : errorImg" mode="aspectFit"></image>
                                            </view>
                                            <view class="h4">{{item.companyDetail.title}}</view>
                                            <view class="famous_icon span" v-if="item.companyDetail.famous">名企</view>
                                        </view>
                                        <view class="cdetail">
                                            <view class="cinfo p">
                                                <text class="span">{{item.companyDetail.nature_name}}</text><text class="em">|</text><text class="span">{{item.companyDetail.scale_name}}</text><text class="em">|</text><text class="span">{{item.companyDetail.industry_name}}</text>
                                            </view>
                                            <view class="caddr p" v-if="(item.job_addr_detail && item.job_addr_detail.addrName && item.job_addr_detail.addrName.length)">{{item.job_addr_detail.addrName[item.job_addr_detail.addrName.length - 1]}}</view>
                                        </view>
                                    </view>
                                </view>
                            </view>
                        </view>
    
                        <!-- 普工求职 -->
                        <view :class="['list_con pgqz']" v-if="dataobj.showObj.id == 20">
                            <view class="f-item">
                                <view class="fi-left">
                                    <view class="title" :style="'color:'+dataobj.dataObj.modCon.style.color+';'">{{item.title}}</view>
                                    <view class="address">期望地点：{{item.addrName  ? item.addrName.join(' ') : item.addrName}}</view>
                                    <view class="user">
                                        <image  class="photo" @error="imgLoadErr(item,'photo')" :src="item.photo ? item.photo : errPhoto" mode="aspectFill" ></image>
                                        <view class="details">
                                            <view class="name">{{item.nickname}}<text class="span" v-if="item.sex_name">({{item.sex_name}})</text></view>
                                            <view class="age" v-if="item.age">{{item.age}}岁</view>
                                            <view v-if="item.experience_name">{{item.experience_name}}经验</view>
                                        </view>
                                    </view>
                                </view>
                                <view class="fi-right" v-if="userid && !userPhoneCheck && privateNumber_state" @click.stop.prevent="bindUserPhoneNumber" :data-index="dind" :data-info="item"
                                                                data-module="job" data-temp="qz" :data-aid="item.id"
                                                                :data-tel="item.phone">
                                    <image  mode="aspectFill"  :src="masterDomain + '/static/images/admin/siteConfigPage/phoneW.png'"></image>
                                    <text class="span">电话</text>
                                </view>
                                <view class="fi-right" v-else @click.stop.prevent="callPhone" :data-index="dind" :data-info="item"
                                                                data-module="job" data-temp="qz" :data-aid="item.id"
                                                                :data-tel="item.phone">
                                    <image  mode="aspectFill"  :src="masterDomain + '/static/images/admin/siteConfigPage/phoneW.png'"></image>
                                    <text class="span">电话</text>
                                </view>
                            </view>
                        </view>
    
    
                        <!-- 普工招人 -->
                        <view :class="['list_con pgzr']" v-if="dataobj.showObj.id == 19">
                            <!-- 标题 -->
                            <view class="di-title">
                                <view class="p" :style="'color:'+dataobj.dataObj.modCon.style.color+';'">{{item.title}}</view>
                                <text class="span" :style="'color:'+dataobj.dataObj.modCon.style.scolor+';'">{{item.min_salary}}-{{item.max_salary}}<text class="span">{{currency.short ? currency.short : '元'}}</text></text>
                            </view>
                            <!-- 标签 -->
                            <view class="di-label">
                                <view class="left">
                                    <view>
                                        <view class="p" v-if="Array.isArray(item.welfare_name)">
                                            <block  v-for="(lab,lind) in item.welfare_name" :key="lind">
                                                <text>
                                                    {{lab}}
                                                </text>
                                                <text class="span" v-if="lind < (item.welfare_name.length - 1)">/</text>
                                            </block>
                                        </view>
                                    </view>
                                    <view class="label">
                                        <view v-if="item.nature_name">{{item.nature_name}}</view>
                                        <view v-if="item.education_name">{{item.education_name}}</view>
                                        <view v-if="item.experience||item.experience==0">{{item.experience==0?'经验不限':item.experience+'年'}}</view>
                                    </view>
                                </view>
                                <view class="right" v-if="userid && !userPhoneCheck && privateNumber_state" @click.stop.prevent="bindUserPhoneNumber" :data-index="dind" :data-info="item"
                                                                data-module="job" data-temp="zg" :data-aid="item.id"
                                                                :data-tel="item.tel">
                                    <view class="span" >电话</view>
                                </view>
                                <view class="right" v-else @click.stop.prevent="callPhone" :data-index="dind" :data-info="item"
                                                                data-module="job" data-temp="zg" :data-aid="item.id"
                                                                :data-tel="item.tel">
                                    <view class="span" >电话</view>
                                </view>
                            </view>
                            <!-- 用户 -->
                            <view class="di-user">
                                <view v-if="item.nickname">{{item.nickname}}</view>
                                <view v-if="item.address">{{item.address}}</view>
                            </view>
                        </view>
                    </block>
                </view>

                <!-- 信息流广告 -->
                <block  v-if="['tieba','info','article','sfcar'].includes(dataobj.showObj.service) && dataobj.dataObj.modCon.flowAdv.show && checkFlowAdShow(dind)">
                    <view :class="{'cardShow':dataobj.dataObj.cardStyle,'li':true,'moreList':dataobj.more && dataobj.more.show,'emptyNone':true}" :style="checkStyle(dataobj.dataObj,'list')" v-if="uniPlatform == 'mp-weixin' && dataobj.dataObj.modCon.flowAdv.wxmini">
                        <ad  :unit-id="dataobj.dataObj.modCon.flowAdv.wxmini" bindload="adLoad" binderror="adError" bindclose="adClose"></ad>
                    </view>
                    <view :class="{'cardShow':dataobj.dataObj.cardStyle,'li':true,'moreList':dataobj.more && dataobj.more.show,'emptyNone':true}" :style="checkStyle(dataobj.dataObj,'list')" v-if="uniPlatform == 'mp-toutiao' && dataobj.dataObj.modCon.flowAdv.dymini">
                        <ad :class="{'cardShow':dataobj.dataObj.cardStyle,'li':true,'moreList':dataobj.more && dataobj.more.show,'emptyNone':true}" :style="checkStyle(dataobj.dataObj,'list')" :unit-id="dataobj.dataObj.modCon.flowAdv.dymini" bindload="adLoad" binderror="adError" bindclose="adClose"></ad>
                    </view>
                    <view class="adContainer" v-if="uniPlatform == 'web' && dataobj.dataObj.modCon.flowAdv.h5.app_id  && dataobj.dataObj.modCon.flowAdv.h5.placement_id">
                        <view :id="'huoniao_info_flow' + single_id + '_' + checkAdvInd(dind) " :class="{'cardShow':dataobj.dataObj.cardStyle,'li':true,'moreList':dataobj.more && dataobj.more.show,'emptyNone':true}" :style="checkStyle(dataobj.dataObj,'list')"> </view>
                    </view>
                </block>
            </block>
        </view>
        
        <!--瀑布流布局-->
        <view :class="['flowbox','flowbox' + dataobj.dataObj.styletype]" v-if="dataobj && [2,4].includes(dataobj.dataObj.styletype)" :style="'margin:0 '+(dataobj.dataObj.style.marginLeft)+'rpx; column-gap:'+(dataobj.dataObj.style.splitMargin)+'rpx;'" >
            <view  v-for="ul in 2"  :key="'ul_'+ul" :class="['list_ul ul',(dataobj && dataobj.showObj && dataobj.showObj.id && dataobj.showObj.service !== 'business' ? (dataobj.showObj.service + '_ul') : ''),dataobj.showObj.service == 'business' ? 'shop_ul' : '']">
           
                <view v-if="dataobj.dataObj.modCon.advList && dataobj.dataObj.modCon.advList.show && dataobj.dataObj.modCon.advList.list && dataobj.dataObj.modCon.advList.list.length  && ul == 1" :style="checkStyle(dataobj.dataObj,'list')">
                    <view   class="advList list_con">
                        <!-- <el-carousel>
                            <el-carousel-item v-for="(adv,ind) in dataobj.dataObj.modCon.advList.list" :key="'adv'+adv.id">
                                <img :src="adv.path" v-if="adv.path">
                            </el-carousel-item>
                        </el-carousel> -->

                        <swiper class="swiper" :indicator-dots="dataobj.dataObj.modCon.advList.list && dataobj.dataObj.modCon.advList.list.length > 1" indicator-color="rgba(255,255,255,.3)" indicator-active-color="rgba(255,255,255,1)" circular :autoplay="true" :style="'height:'+ (advHeight ? advHeight : 0) +'px;'">
                            <swiper-item v-for="(adv,ind) in dataobj.dataObj.modCon.advList.list" :key="'adv'+adv.id" >
                                <view class="swiper-item advImg" @click="advToLink(adv)"><image :class="{'loadingImg': !imgHasLoad[adv.path]}" @load="imgLoadEnd(adv.path)"  @error="imgLoadErr(adv,'path')"  :style="'height:'+ (advHeight ? advHeight : 0 )+'px;'"  mode="aspectFill" :src="adv.path" v-if="adv.path ? adv.path :errorImg"></image></view>
                            </swiper-item>
                        </swiper>
                    </view>
                </view>
                <block  v-for="(item,ind) in dataobj.listArr"  :key="dataobj.showObj.service + item.id">
                    <view :class="{'cardShow':dataobj.dataObj.cardStyle,'li':true}"  v-if="ind % 2  == (ul - 1)"  :style="checkStyle(dataobj.dataObj,'list')"  @click="toLink(item)">
                        <!-- 商品 -->
                        <block v-if="dataobj.showObj.service == 'shop'">
                            
                            <view class="list_con" v-if="dataobj.showObj.id !== 5 && dataobj.showObj.id !== 6 && item">
                                <view :class="['picbox', {'absoulte_pic':dataobj.dataObj.modCon.imgScale != 1}]" :style="checkStyle(dataobj.dataObj,'pic')" ><image :class="{'loadingImg': !imgHasLoad[item.litpic]}" @load="imgLoadEnd(item.litpic)"    :src="item.litpic" v-if="item.litpic ? item.litpic : errorImg" @error="imgLoadErr(item,'litpic')"  :mode="dataobj.dataObj.modCon.imgScale === 1 ? 'widthFix' : 'aspectFill'"  :style="dataobj.dataObj.modCon.imgScale === 1 ? '' : 'height:100%;'"></image></view>
                                <!-- 团购 -->
                                <view class="txtbox" >
                                    <view class="pro_info">
                                        <view class="h4" :style="'color:'+dataobj.dataObj.modCon.style.color+';'"><view :class="'span hditem hditem_' + item.huodongarr" v-if="item.huodongarr == '4' || item.huodongarr == '1'">{{item.huodongarr == 1 ? '限时抢' : '拼团'}}</view>{{item.title}}</view>
                                        <view class="p" v-if="dataobj.showObj && dataobj.showObj.id === 1"><text class="address span" >{{item.addr}}</text><view class="em"></view><text class="distance span">{{item.julishop}}</text></view>
                                        <view class="sale_info">
                                            <view class="priceText h5"> <text class="span"  :style="'color:'+dataobj.dataObj.modCon.style.pcolor+';'">{{currency.symbol ? currency.symbol : '￥'}}<text class="b">{{parseFloat(item.price)}}</text></text><text class="s" v-if="item.mprice > item.price">{{currency.symbol ? currency.symbol : '￥'}}{{parseFloat(item.mprice)}}</text> </view>
                                            <view class="sales p" v-if="item.sales > 0">已售 {{item.sales}}</view>
                                        </view>
                                    </view>
                                    <view class="shop_info" v-if="dataobj.dataObj.cardStyle && [1,3].includes(dataobj.showObj.id)">
                                        <view class="h6">{{item.storeTitle}}</view>
                                    </view>
                                </view>
                            </view>
    
                            <!-- 商家 -->
                            <view :class="{'list_con':true,'store_con':dataobj.showObj.id == 5 || dataobj.showObj.id == 6}" v-else>
                                <view :class="['picbox', {'absoulte_pic':dataobj.dataObj.modCon.imgScale != 1}]" :style="checkStyle(dataobj.dataObj,'pic')" >
                                    <view class="tag span">{{item.typename[item.typename.length - 1]}}</view>
                                    <image  :class="{'loadingImg': !imgHasLoad[item.logo]}" @load="imgLoadEnd(item.logo)"  :mode="dataobj.dataObj.modCon.imgScale === 1 ? 'widthFix' : 'aspectFill'"  :style="dataobj.dataObj.modCon.imgScale === 1 ? '' : 'height:100%;'" :src="item.logo ? item.logo : errorImg"  @error="imgLoadErr(item,'logo')" alt=""></image>
                                    <view class="distance span">{{item.distance}}</view>
                                </view>
                                <view class="txtbox" >
                                    <view class="h4" :style="'color:'+dataobj.dataObj.modCon.style.color+';'">{{item.title}}</view>
                                    <view class="p">{{item.address}}</view>
                                    <view class="labs p" v-if="item.cusShoptag && item.cusShoptag.length > 0"><view class="lab span" v-for="(lab,lind) in item.cusShoptag" :key="lind">{{lab}}</view></view>
                                
                                </view>
                            </view>
                            
                        </block>
    
                        
                            <!-- 圈子 -->
                            <view class="list_con" v-else-if="dataobj.showObj.service == 'circle'">
                                <view class="picbox"><image    :src="item.litpic" mode="aspectFill" ></image></view>
                                <view class="txtbox" >
                                    <view class="h4" :style="'color:'+dataobj.dataObj.modCon.style.color+';'">{{item.title}}</view>
                                    <view class="fb_info">
                                        <view class="fb_photo"></view>
                                        <view class="fb_name"></view>
                                    </view>
                                </view>
                            </view>
    
                            
                            <!-- 大商家 -->
                            <view :class="['list_con store_con']" v-else-if="dataobj.showObj.service == 'business'">
                                <view :class="['picbox', {'absoulte_pic':dataobj.dataObj.modCon.imgScale != 1}]"  :style="checkStyle(dataobj.dataObj,'pic')" >
                                    <view class="tag span">{{item.typename[item.typename.length - 1]}}</view>
                                    <image  :class="{'loadingImg': !imgHasLoad[item.logo]}" @load="imgLoadEnd(item.logo)"  :mode="dataobj.dataObj.modCon.imgScale === 1 ? 'widthFix' : 'aspectFill'"  :style="dataobj.dataObj.modCon.imgScale === 1 ? '' : 'height:100%;'" :src="item.logo ? item.logo : errorImg"  @error="imgLoadErr(item,'logo')" alt=""></image>
                                    <text class="distance span">{{item.distance}}</text>
                                </view>
                                <view class="txtbox" >
                                    <view class="h4" :style="'color:'+dataobj.dataObj.modCon.style.color+';'">{{item.title}}</view>
                                    <view class="p">{{item.address}}</view>
                                    <view class="labs p" v-if="item.tagArr && item.tagArr.length > 0"><view class="lab span" v-for="lab in item.tagArr" :key="lab">{{lab}}</view></view>
                                
                                </view>
                            </view>
    
                    </view>
                </block>
            </view>
        </view>
        <!--无限加载有个遮罩-->
        <view :class="{'dataMask':true,'loadEnd':loadEnd}" v-if="dataobj.listArr && dataobj.listArr.length > 0 && dataobj.addType === 1 && dataobj.dataObj.load == 1 ">
            <view class="p" v-if="!isload && !loadEnd">上划加载更多</view>
            <view class="p" v-else-if="isload && !loadEnd">加载中...</view>
            <view class="p" v-else>没有更多了~</view>
        </view>
        <view class="btn_more" v-if="dataobj.listArr && dataobj.listArr.length > 0 && dataobj.dataObj.load != 1 && dataobj.more && dataobj.more.show" @click="advToLink(dataobj.more)">
            <text class="span" :style="checkStyle(dataobj,'btnMore')">{{dataobj.more.text}}</text>
        </view>

    </view>
    
</template>

<script>
import mpHtml from '../mp-html/mp-html.vue'
// @error="imgLoadErr(item,'litpic')"
// import richText from '../../utils/richText.js';

const app = getApp()
export default {
  components: { mpHtml },
    name:'listModule',
    emits:['callphone','bindphone','tolink','shareinfo'],
    data(){
        return{
            // userid:'', //当前登录用户
            // masterDomain : app.globalData.masterDomain,
            errorImg:(app.globalData.masterDomain + '/static/images/404.jpg'),
            errPhoto:(app.globalData.masterDomain + '/static/images/noPhoto_100.jpg'),
            userid:app.globalData.userid,
            isAjax:false, //正在请求接口
            advHeight:0,
            uniPlatform:'',
            flowAdvList:[],
            hasDraw:0, //是否已经开始
            advInd:0, //当前的广告索引
            check_adv:null, //定时器
            currAdvInd:0,
            imgHasLoad:{},
            imgurl: app.globalData.imgPath + '/article/',
        }
    },
    props:{
        dataobj:{
            type:Object,
            default:{}, //传过的数据
        },
        isload:{  //是否正在加载
            type:Boolean,
            defalult:false,
        },
        privateNumber_state:{
            type:Number,
            defalult:0
        },
        userPhoneCheck:{
            type:Number,
            defalult:0
        },
        
        masterDomain:{
            type:String,
            defalult:''
        },
        // userid:{
        //     type:String,
        //     default:app.globalData.userid
        // },
        loadEnd:{  //是否加载结束
            type:Boolean,
            defalult:false,
        },

        currency:{
            type:Object,
            default:{}
        },

        single_id:{
            type:String,
            defalult:'',
        }
    },
    watch:{
        'dataobj.dataObj.interface.page':{
            handler:function(val){
                if(this.flowAdvList.length){
                    this.putInnAdv(val) 
                }
            },
            immedite:true,
        }
    },
    mounted(){
        this.uniPlatform = uni.getSystemInfoSync().uniPlatform
        this.errorImg = this.masterDomain + '/static/images/404.jpg'
        this.errPhoto = this.masterDomain + '/static/images/noPhoto_100.jpg'
        if(this.dataobj.dataObj.modCon.advList && this.dataobj.dataObj.modCon.advList.show && this.dataobj.dataObj.modCon.advList.list && this.dataobj.dataObj.modCon.advList.list.length){
            this.getAdvHeight()
        }

        
        if(this.dataobj && this.dataobj.dataObj.modCon.flowAdv && this.dataobj.dataObj.modCon.flowAdv.show && this.uniPlatform == 'web' && this.dataobj.dataObj.modCon.flowAdv.h5.app_id && this.dataobj.dataObj.modCon.flowAdv.h5.placement_id ){  //显示h5信息流广告 需要在web中 
            // console.log('广告——' + this.dataobj.showObj.service)
            setTimeout(() =>{
                this.loadFlowAdvWeb()

            },500)
        }

        
    },
    methods:{
        imgLoadErr(obj,key){
            const that = this;
            if(key == 'photo'){
                that.$set(obj,key,that.errPhoto);
            }else{
                that.$set(obj,key,that.errorImg);
            }
        },
        // 日期转换
        transTimes:function(timestamp,n){
            const dateFormatter = app.dateFormatter(timestamp);
            const year = dateFormatter.year;
            const month = dateFormatter.month ;
            const day = dateFormatter.day;
            const hour = dateFormatter.hour;
            const minute = dateFormatter.minute;
            const second = dateFormatter.second;
            if (n == 1) {
                return (year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second);
            } else if (n == 2) {
                return (year + '-' + month + '-' + day);
            } else if (n == 3) {
                return (month + '-' + day);
            } else {
                return 0;
            }
        },

        // 样式转换
        checkStyle(data,box){
            let styleArr = []
            if(box == 'list'){
                if(data.cardStyle){
                    styleArr.push('background-color:' + data.style.listBgColor);
                }
                // styleArr.push('margin-bottom:');
                styleArr.push('border-radius:' +( data.style.borderRadius) + 'rpx; overflow:hidden');
                
                if(data.styletype !== 4 && data.styletype !== 2){ //不是 双列 / 瀑布流
                    if(data.cardStyle){
                        styleArr.push('margin:0 ' + (data.style.marginLeft ) + 'rpx '  + (data.style.splitMargin) + 'rpx');
                    }else{
                        styleArr.push('margin:0 ' + (data.style.marginLeft ) + 'rpx ');
                        styleArr.push('padding-top:' + (data.style.splitMargin/2) + 'rpx ');
                        styleArr.push('padding-bottom:' + (data.style.splitMargin/2) + 'rpx ');
                    }
                    if(data.style.marginLeft == 0 && data.cardStyle){ //属于列表卡片时 可设置内边距
                        styleArr.push('padding-left:' + (data.style.padding ) + 'rpx');
                        styleArr.push('padding-right:' + (data.style.padding)+ 'rpx');
                    }else if(data.cardStyle){
                        styleArr.push('padding-left:28rpx');
                        styleArr.push('padding-right:28rpx');
                    }

                    if(!data.cardStyle && data.style.lineColor){ //底部边框
                        if(data.interface.service != 'house'){
                            styleArr.push('border-bottom:solid 1rpx' + data.style.lineColor);
                        }
                        styleArr.push('border-radius:0');
                    }

                }else{ //双列
                    styleArr.push('margin-bottom: '+ (data.style.splitMargin) + 'rpx');
                }
            }else if(box == 'pic'){ //图片显示比例
                if(data.modCon.imgScale === 1){ //自适应
                    let ww = app.globalData.ww ? app.globalData.ww : uni.getSystemInfoSync().windowWidth;
                    let margin = this.rpxTopx(data.style.marginLeft)  * 2 + this.rpxTopx(data.style.splitMargin) ;
                    let pw = (ww - margin) / 2
                    let minH = pw * 3 / 4;
                    let maxH = pw * 4 / 3;
                    styleArr.push('min-height: ' + minH + 'px; max-height:' + maxH + 'px')
                }else if(data.modCon.imgScale == 2){
                    // styleArr.push('aspect-ratio: 1 / 1; height:auto')
                    styleArr.push('padding-bottom:100%')
                }else if(data.modCon.imgScale == 3){
                    // styleArr.push('aspect-ratio: 4 / 3; height:auto')
                    styleArr.push('padding-bottom:' + (3/4) * 100 + '%')
                }else if(data.modCon.imgScale == 4){
                    // styleArr.push('aspect-ratio: 3 / 2; height:auto')
                    styleArr.push('padding-bottom:' + (2/3) * 100 + '%')
                }
            }else if(box == 'btnMore'){
                // styleArr.push('color:'+data.more.style.color+';')
                // styleArr.push('margin:0 '+data.dataObj.style.marginLeft+'rpx;')
                // styleArr.push('border-radius:'+data.dataObj.style.borderRadius+'rpx;')
                // styleArr.push('background-color:'+data.more.style.btnBg)
                // styleArr.push('height:'+(data.more.style.btnHeight)+'rpx')
                // styleArr.push('border:solid 1rpx '+(data.more.style.btnBorder ? data.more.style.btnBorder : 'transparent' ))

                if(data.dataObj.cardStyle){
                    styleArr.push('border:solid 1rpx '+(data.more.style.btnBorder ? data.more.style.btnBorder : 'transparent' ))
                    styleArr.push('margin:0 '+(data.dataObj.style.marginLeft )+'rpx')
                    styleArr.push('border-radius:'+(data.dataObj.style.borderRadius)+'rpx;')
                }
                styleArr.push('color:'+data.more.style.color+';')
                styleArr.push('background-color:'+data.more.style.btnBg)
                styleArr.push('height:'+(data.more.style.btnHeight )+'rpx')
            }
            return styleArr.join(';');
        },

         // rpx 转换为 px ，传参类型是数字（Number）
         rpxTopx(rpx) {
            let deviceWidth = uni.getSystemInfoSync().windowWidth; //获取设备屏幕宽度
            let px = (deviceWidth / 750) * Number(rpx)
            return Math.floor(px);
        },

        advToLink(adv){
            const that = this;
            that.$emit('tolink',adv)
        },

        // 获取广告位的高度
        getAdvHeight(){
            const that = this;
            let query = uni.createSelectorQuery().in(this);
            query.select('.flowbox .li').boundingClientRect();
            query.exec((res) => {
                if(res){

                    let height = res[0].height;
                    that.advHeight = height
                }
            })
        },

        toLink(item,param){
            const that = this;
            const uniPlatform = uni.getSystemInfoSync().uniPlatform ; //运行平台
            
             if(uniPlatform == 'web'){
                let url = item.url;
                if(param){
                    url = url.indexOf('?') > -1 ? (url + '&' + param) : (url + '?' + param) 
                }
                if(window.appBoolean){
                    let paramStr = url.indexOf('?') > -1 ? url.split('?')[1]:''
                    let paramArr = paramStr.split('&');
                    let newParamArr = []
                    for(let i = 0; i < paramArr.length; i++){
                        let param = paramArr[i].split('=')[0];
                        let val   = paramArr[i].split('=').length > 1 ? paramArr[i].split('=')[1] : '';
                        if(/.*[\u4e00-\u9fa5]+.*$/.test(val)){
                            newParamArr.push(param + '=' + encodeURIComponent(val))
                        }else{
                            newParamArr.push(param + '=' + val)
                        }
                    }
                    let newParamStr = newParamArr.join('&')
                    let newUrl = url.split('?')[0] + '?' + newParamStr; //将链接中的中文encode一下
                    window.setupWebViewJavascriptBridge(function(bridge) {
                        // getAppInfo加在此处的作用就是 首次安装无法点击
                     
                        bridge.callHandler('redirectNative', {
                            'name': '',
                            'code': '',
                            'link': newUrl
                        }, function() {});
                    })
                    return false
                }
                if (item.url.indexOf('http') > -1) {
                    location.href = url;
				} else {
                    uni.navigateTo({
                        url: url
                    });
                }
            }else{
                let service = that.dataobj.showObj.service; // 当前模块code
                let url = item.url
                
                if(service == 'info'|| service == 'article' || service == 'sfcar' || service == 'tieba' ||service=='shop'){
                    url = '/pages/packages/' + service + '/detail/'+(service == 'article' ? 'index' : 'detail')+'?id=' + item.id;
                    if(param){
                        url = url + '&' + param
                    }
                    uni.navigateTo({
                        url: app.addUrlParam(url)
                    });
                }else if(service == 'job'){
                    if(that.dataobj.showObj.id == 18){
                        url = '/pages/packages/job/job/job?id=' + item.id
                    }else if(that.dataobj.showObj.id == 20){
                        url = '/pages/packages/job/qzDetail/qzDetail?id=' + item.id
                    }else if(that.dataobj.showObj.id == 19){
                        url = '/pages/packages/job/zgDetail/zgDetail?id=' + item.id
                    }
                    if(param){
                        url = url + '&' + param;
                    }
                    uni.navigateTo({
                        url: app.addUrlParam(url)
                    });
                }else{
                    if(param){
                        url = url.indexOf('?') > -1 ? (url + '&' + param) : (url + '?' + param) 
                    }
                    uni.navigateTo({
                        url: '/pages/redirect/index?url=' + encodeURIComponent(app.addUrlParam(
                            url))
                    });
                }
            }
        },

        

        // 拨打电话
        callPhone(e) {
            // console.log(e)
            this.$emit('callphone',e);
        },
        
        // 绑定手机号
        bindUserPhoneNumber(e){
            this.$emit('bindphone',e);

        },
       
        // 评论
        toReply(obj){
            const that = this;
            // 跳转详情页
            that.toLink(obj,'toReply=1')

        },

        // 点赞
        toZan(obj,mod){
            const that = this;
            // const uniPlatform = uni.getSystemInfoSync().uniPlatform ; //运行平台log(this.userid);
            let bool = app.loginCheck(app.globalData.masterDomain);
            if(!bool) return false; //直接跳转登录页面
           
            // 点赞
            // let ajaxUrl = '/include/ajax.php?service=member&action=getZan';
            let param = {
                service:'member',
                action:'getZan',
                module:mod,
                temp:'detail',
                id:obj.id,
                uid:app.globalData.userid,
                title:obj.title,
            }
            if(that.isAjax) return false;
            that.isAjax = true;
            that.$ajax.post({
					url: app.encodeUrl('include/ajax.php?'),
					data: param
				}).then(res => {
					if (res.data.state == 100) {
						that.$set(obj,'has_zan',!obj.has_zan); //是否点过赞
                        if(obj.has_zan){
                            that.$set(obj,'up',obj.up + 1 ); //点赞个数改变
                        }else{
                            that.$set(obj,'up',obj.up - 1 );
                        }
					} 
					that.isAjax = false;
				})

        },

        // html标签转换uniapp
        htmlToUni(item,color){
            // const that = this;
            let colorStr = color ? ('color:' + color) : ''
            let html = '<div class="" style=\" margin-left:4px;  word-break: break-all; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;'+ colorStr +'\">'+item.title+'</div>'
          
            return html
        },

        // 验证信息流广告是否显示
        checkFlowAdShow(ind){
            const that = this;
            let loadAd = false;
            let advInd = 0
            if(that.dataobj.addType == 1 && that.dataobj.dataObj.load == 1){ //无限加载
                let pageSize = that.dataobj.dataObj.interface.pageSize
                loadAd = (ind % pageSize == (pageSize - 1) && ind > 0)
                
            } else{
                loadAd = (ind  == (Math.ceil(that.dataobj.listArr.length / 2) - 1))
                advInd = 1
            }
            return loadAd
        },
        checkAdvInd(ind){
            const that = this;
            let advInd = 0;
            if(that.dataobj.addType == 1 &&  that.dataobj.dataObj.load == 1){ //无限加载
                let pageSize = that.dataobj.dataObj.interface.pageSize
                advInd = Math.ceil(ind / pageSize)
                // console.log('当前页码' + advInd)
            }else{
                advInd = 1
            }
            if(ind == (that.dataobj.listArr.length - 1)){
                that.currAdvInd = advInd
            }
            return advInd
        },

        // 初始化
        loadFlowAdvWeb(){
            const that = this
             // 获取h5端端app_id和placement_id,
             window.TencentGDT = window.TencentGDT || [];
             
            // 2. 广告初始化：填写参数值。 具体字段含义详见:《H5SDK 开发者文档》：https://developers.adnet.qq.com/doc/web/js_develop
            let app_id = that.dataobj.dataObj.modCon.flowAdv.h5.app_id
            let placement_id = that.dataobj.dataObj.modCon.flowAdv.h5.placement_id
            window.TencentGDT.push({
                app_id: app_id, // {String} - APPID - 必填
                placement_id: placement_id, // {String} - 广告位ID - 必填
                type: 'native', // {String} - 原生广告类型 - 必填
                count: 10, // {Number} - 拉取广告的数量，默认是3，最高支持10 - 选填，超过 10 条会被限流
                onComplete: function (res) {
                    console.log('获取广告' + that.dataobj.showObj.service)
                    if (res && res.constructor === Array) {
                        console.log('已获取广告' + that.dataobj.showObj.service)
                        that.hasDraw = 0;
                        that.flowAdvList = res; //广告列表赋值给全局变量
                        if(!that.currAdvInd){
                            that.putInnAdv(1)
                        }else{
                            let currLen = that.currAdvInd % 10 ?  that.currAdvInd % 10 : 9
                           for(let i = 1; i <= currLen; i++){
                            that.putInnAdv(Math.floor(that.currAdvInd / 10) * 10 + i)
                           }
                        }
                    } else {
                        // 加载广告API，如广告回调无广告，可使用loadAd再次拉取广告
                        // 注意：拉取广告频率每分钟不要超过20次，否则会被广告接口过滤，影响广告位填充率
                        setTimeout(function () {
                            window.TencentGDT.NATIVE.loadAd(placement_id)
                        }, 3000)
                    }
                }
            });

            // console.log(window.TencentGDT)

            // 3. H5 SDK接入全局只需运行一次，切必须放在第2步之后
            if(!window.loadJS){
                window.loadJS = 1; //表示已加载数据
                setTimeout(() => {
                    (function () {
                        var doc = document,
                            h = doc.getElementsByTagName('head')[0],
                            s = doc.createElement('script');
                        s.async = true;
                        s.src = '//qzs.gdtimg.com/union/res/union_sdk/page/h5_sdk/i.js';
                        h && h.insertBefore(s, h.firstChild);
                    })();
                }, 1000);
            }
        },

        
        drawAdv2(ind){ //表示当前渲染的条数 需要减一才是当前要渲染的广告索引  
            const that = this;
            if(this.dataobj && this.dataobj.dataObj.modCon.flowAdv && this.dataobj.dataObj.modCon.flowAdv.show && this.uniPlatform == 'web' ){ 
                let app_id = that.dataobj.dataObj.modCon.flowAdv.h5.app_id
                let placement_id = that.dataobj.dataObj.modCon.flowAdv.h5.placement_id
                if(!app_id || !placement_id) return false
                 //显示h5信息流广告 需要在web中 并且配置了信息流广告所需要的数据
                if(that.flowAdvList && that.flowAdvList.length){
                    for(let i = 1; i <= ind; i++){
                        that.putInnAdv(i)
                    }
                }else{
                    let times = 0;
                    if (that.check_adv) { //清空计时器
                        clearInterval(that.check_adv)
                    }
                    that.check_adv = setInterval(function() {
                        ++times;
                        if (that.flowAdvList && that.flowAdvList.length) {
                            clearInterval(that.check_adv); //清空计时器
                            that.putInnAdv(ind);
                        } else if (times >= 10) {
                            clearInterval(that.check_adv); //清空计时器
                        }
                    }, 1000)
                };
            }
        },
        putInnAdv(page) { //渲染
            const _this = this;
            let placement_id = _this.dataobj.dataObj.modCon.flowAdv.h5.placement_id
            let currInd = page % 10 >= 1 ? (page % 10 - 1) : (page % 10 + 9); //当前广告索引  默认加载10条
            if(_this.flowAdvList.length &&  _this.flowAdvList[currInd]){
                _this.hasDraw = _this.hasDraw + 1;
                let adv_curr = _this.flowAdvList[currInd];
                window.TencentGDT.NATIVE.renderAd(adv_curr, `huoniao_info_flow${_this.single_id}_${page}`); //渲染广告
                // 曝光上报
                window.TencentGDT.NATIVE.doExpose({
                    container: `huoniao_info_flow${_this.single_id}_${page}`,
                    advertisement_id: adv_curr.advertisement_id,
                    placement_id: adv_curr.placement_id,
                    traceid: adv_curr.tid,
                });

                // 点击上报
                let advBox = document.getElementById('huoniao_info_flow'+ _this.single_id + '_' + page);
                if(advBox ){

                    let adv = advBox.getElementsByTagName('iframe');  //获取当前广告的iframe  
                    let down_x = 0, //鼠标按下的x周坐标
                        down_y = 0,//鼠标按下的y周坐标
                        up_x = 0,//鼠标松开的x周坐标
                        up_y = 0;//鼠标松开的y周坐标
    
                    // 监听鼠标按下事件
                    adv[0].contentDocument.onmousedown = function () {
    
                        down_x = event.offsetX
                        down_y = event.offsetY;
                    }
    
                    // 监听鼠标松开事件
                    adv[0].contentDocument.onmouseup = function () {
                        if($(event.target).hasClass('del')) {
                            $(adv[0]).closest('.emptyNone').remove()
                            return false;
                        }
                        up_x = event.offsetX;
                        up_y = event.offsetY;
                        let s_data = {
                            "down_x": down_x,
                            "down_y": down_y,
                            "up_x": up_x,
                            "up_y": up_y
                        }
                        // 点击上报
                        window.TencentGDT.NATIVE.doClick({
                            s: encodeURIComponent(JSON.stringify(s_data)),
                            container: 'huoniao_info_flow'+ _this.single_id + '_'  + page,
                            advertisement_id: adv_curr.advertisement_id,
                            placement_id: adv_curr.placement_id,
                            traceid: adv_curr.tid,
                        });
                    }
                }



                if (_this.hasDraw == (_this.flowAdvList.length)) { //广告重新获取
                    window.TencentGDT.NATIVE.loadAd(placement_id);
                }
            }else if(_this.hasDraw == _this.flowAdvList.length){
                window.TencentGDT.NATIVE.loadAd(placement_id);

            }
        },
        // 点击分享按钮
        shareInfoTo(item){
            const that = this;
            if(that.uniPlatform == 'web'){
                that.$nextTick(() => {
                    that.$emit('shareinfo',item)
                })
            }
        },

        imgLoadEnd(path){
           this.$set(this.imgHasLoad,path,1)
        },

        adLoad(e){
            console.log(e)
        },
        adError(e){
            console.log(e)
        },
        adClose(e){
            console.log(e)
        },
    },
}
</script>
<style scoped>
@import './listModule.css';
</style>